In computer technology, data is stored in memory devices, from which data may be read and to which data may be written. Memory devices can be volatile or non-volatile. A volatile memory device does not store data after it is powered off, while a non-volatile memory continues to store data after it has been powered off. When the non-volatile memory device is powered back on, the data that stored on the non-volatile memory device while it was powered off can be read.
Examples of a volatile memory device include Volatile Random Access Memory devices (VRAM). Examples of non-volatile memory devices include disk drive devices, flash memory devices, and storage servers, the primary purpose of which is to provide shared access to a set of disk drives or non-volatile memory devices.
Volatile memory devices provide much quicker access but are more expensive, while non-volatile memory devices offer persistence and are less expensive. To provide persistence to a vast body of data and to balance storage costs and quick access, a body of data is primarily stored in non-volatile memory devices and temporary copies of a small portion of the body of data are stored in a volatile memory device, where the copies are accessed very quickly and efficiently. Storage, such as memory in a non-volatile memory device, that is used to hold temporary copies of data stored in a slower form of storage is referred to herein as a cache. The slower form of storage that stores data of which there are temporary copies in a cache is referred to herein as primary storage with respect to the cache.
Often, a cache is a volatile memory device and primary storage is a non-volatile memory device. However, this may not always be the case. A cache and primary storage may both be volatile memory or both may be non-volatile memory. Described herein are approaches to efficiently use a non-volatile cache for non-volatile primary storage in storage device.